<!DOCTYPE HTML>
<html>
<head>
	<meta charset="utf-8">
	<title>mounted</title>
	<!-- <script src="https://unpkg.com/vue@next"></script> -->
	<script src="js/vue.global.js"></script>
	<link rel="stylesheet" href="css/com.css">
</head>
<body>
	
<div id="app" class="">
	
</div>

</body>
<script>
const HelloVueApp = {
	data() {
		return {
			name: 'iphoneXR',
			price: 5000,
			number: 2,
		}
	},
	//计算属性
	computed:{
		
	},
	//实例挂载完成后被调用
	mounted(){
		this.$nextTick(function () {
			// 仅在整个视图都被渲染之后才会运行的代码
			console.log('this.$nextTick');
		})
		this.fn();
	},
	//方法属性
	methods:{
		total_fn:function(){
			return this.price * this.number;
		},
		fn(){
			console.log('echo fn');
		}
	}
}
var vm = Vue.createApp(HelloVueApp).mount('#app');

</script>

</html>